Skip to content

feat(explore): enable heat map tooltips on click#115413

Open
nikkikapadia wants to merge 2 commits into
masterfrom
nikki/feat/heat-map-click-tooltip
Open

feat(explore): enable heat map tooltips on click#115413
nikkikapadia wants to merge 2 commits into
masterfrom
nikki/feat/heat-map-click-tooltip

Conversation

@nikkikapadia
Copy link
Copy Markdown
Member

this just enables the tooltip on heat map charts and shows the tooltip on click instead of on hover. I have to make the formatter for the tooltip so it's showing the default for now. Here's a demo of it working:

Screen.Recording.2026-05-12.at.3.55.21.PM.mov

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.51%

@nikkikapadia nikkikapadia marked this pull request as ready for review May 12, 2026 20:29
@nikkikapadia nikkikapadia requested a review from a team as a code owner May 12, 2026 20:29
@nikkikapadia nikkikapadia requested a review from gggritso May 12, 2026 20:29
Comment on lines 68 to +73
tooltip={{
show: false,
show: true,
axisPointer: {
show: false,
},
triggerOn: 'click',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The heatmap tooltip formatter is not customized for 3D data, causing it to display the Y-axis label instead of the Z-axis count as the series value.
Severity: MEDIUM

Suggested Fix

Provide a custom formatter function in the tooltip configuration for the heatmap chart. This formatter should correctly access the Z-axis value from the 3D series data at index 2 (e.g., params.value[2]) to display the correct count in the tooltip.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location:
static/app/views/dashboards/widgets/heatMapWidget/heatMapWidgetVisualization.tsx#L68-L73

Potential issue: The `tooltip` configuration for the heatmap chart in
`heatMapWidgetVisualization.tsx` lacks a custom `formatter`. Consequently, the default
formatter from `tooltip.tsx` is used, which is designed for 2D data and extracts the
value from index 1 of the series data (`getSeriesValue(serie, 1)`). For heatmap series,
which are 3D (`[xAxis, yAxis, zAxis]`), index 1 holds the Y-axis bucket label (e.g.,
'p95'), while the actual count is at index 2. This results in the tooltip incorrectly
displaying the Y-axis label as the metric value, misleading users about the data.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya ya later problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant